home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0264.ZIP
/
GEMINI.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-11-24
|
5KB
|
197 lines
program geminiset;
var
dev:text;
procedure start;
begin
textbackground(blue);
graphbackground(blue);
clrscr;
window (48,1,79,10);
clrscr;
gotoxy (1,1);
writeln ('GEMINI Printer Control Menu');
writeln ('George Goldberg - Phoenix');
writeln;
writeln ('Keep choosing letters till your');
writeln ('printer is set how you want it');
writeln ('Then push Q to quit program');
end;
procedure printsize;
begin
window (1,2,30,18);
textbackground(cyan);
textcolor (black);
clrscr;
gotoxy(3,2);
writeln ('PRINTSIZE MENU');
writeln;
writeln (' A Pica');
writeln (' B Elite');
writeln (' C Compressed');
writeln (' D Pica enlarged');
writeln (' E Elite enlarged');
writeln (' F Comprsd enlarged');
end;
procedure left;
begin
window (4,12,40,20);
textbackground(black);
textcolor (yellow);
clrscr;
gotoxy(3,2);
writeln ('SIZE OF LEFT MARGIN MENU');
writeln;
writeln (' L 0.00 inch margin');
writeln (' M 0.50 inch margin');
writeln (' N 0.75 inch margin');
writeln (' O 1.00 inch margin');
writeln (' P 1.50 inch margin');
end;
procedure printquality;
begin
window (25,3,46,15);
textcolor(blue);
textbackground (green);
clrscr;
gotoxy (3,2);
writeln ('PRINT QUALITY MENU');
writeln;
writeln (' G Standard ASCII');
writeln (' H Italic ASCII');
writeln (' I Double Strike');
writeln (' J Emphasized (pica)');
writeln (' K Underline');
end;
procedure linespace;
begin
window (32,11,71,20);
textbackground(brown);
textcolor (black);
clrscr;
gotoxy(3,2);
writeln ('LINE SPACING MENU');
writeln;
writeln (' R 4 lines per inch');
writeln (' S 6 lines per inch');
writeln (' T 8 lines per inch');
writeln (' U 10 lines per inch');
end;
procedure linesperpage;
begin
window (55,12,79,25);
textbackground(white);
textcolor (blue);
clrscr;
gotoxy(3,2);
writeln ('LINES PER PAGE MENU');
writeln;
writeln (' + 5 lines per page');
writeln (' - 8 lines per page');
writeln (' 1 11 lines per page');
writeln (' 2 22 lines per page');
writeln (' 3 33 lines per page');
writeln (' 4 44 lines per page');
writeln (' 5 55 lines per page');
writeln (' 6 66 lines per page');
writeln (' 7 77 lines per page');
writeln (' 8 88 lines per page');
write (' 9 99 lines per page');
end;
procedure endbox;
begin
window (26,19,57,24);
textbackground(red);
textcolor (white);
clrscr;
gotoxy(1,2);
writeln (' Q Quit this program');
writeln (' V Print 80 Char test line');
writeln (' W Set printer to top of page');
writeln (' X Move paper up 6 lines');
write (' Y Initialize printer (RESET)');
end;
procedure main;
const
cp: array ['A'..'F'] of integer =
(10,12,17,5,6,8);
var
cpi:integer;
esc,ch:char;
begin
esc:= chr(27);
window (1,21,24,25);
textbackground (blue);
textcolor (black);
clrscr;
gotoxy (1,1);
assign (dev,'LST:');
reset (dev);
write (dev,esc,chr(64));
cpi:=10;
repeat
read (kbd,ch);
if upcase(ch) in ['A'..'Y','+','-','1'..'9'] then
begin
write (' ',upcase(ch));
if upcase(ch) in ['A'..'F'] then cpi:=cp[upcase(ch)];
case upcase(ch) of
'A': write (dev,esc,chr(66),chr(1));
'B': write (dev,esc,chr(66),chr(2));
'C': write (dev,esc,chr(66),chr(3));
'D': write (dev,esc,chr(66),chr(1),esc,chr(87),chr(1));
'E': write (dev,esc,chr(66),chr(2),esc,chr(87),chr(1));
'F': write (dev,esc,chr(66),chr(3),esc,chr(87),chr(1));
'G': write (dev,esc,chr(53));
'H': write (dev,esc,chr(52));
'I': write (dev,esc,chr(71));
'J': write (dev,esc,chr(69));
'K': write (dev,esc,chr(45),chr(1));
'L': write (dev,esc,chr(77),chr(1));
'M': write (dev,esc,chr(77),chr((cpi div 2)+1));
'N': write (dev,esc,chr(77),chr((cpi div 2)+(cpi div 4)+1)) ;
'O': write (dev,esc,chr(77),chr(cpi+1));
'P': write (dev,esc,chr(77),chr(cpi + (cpi div 2) +1));
'R': write (dev,esc,chr(65),chr(18));
'S': write (dev,esc,chr(50));
'T': write (dev,esc,chr(48));
'U': write (dev,esc,chr(65),chr(7));
'V': writeln (dev,
'1........1.........2.',
'This is a sample of an eighty character test line.........');
'W': write (dev,chr(12));
'X': write (dev,esc,chr(97),chr(6));
'Y': write (dev,esc,chr(64));
'+': write (dev,esc,chr(67),chr(5));
'-': write (dev,esc,chr(67),chr(8));
'1','2','3','4','5','6','7','8','9':
write (dev,esc,chr(67),chr((ord(ch)-ord('0')) *11));
end;
end;
until upcase(ch)='Q';
end;
begin
start;
printsize;
printquality;
left;
linespace;
linesperpage;
endbox;
main;
textmode;
textbackground(blue);
clrscr;
writeln ('The printer is now set as you requested.');
writeln (dev);
end.